<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .div1,.div3{
            background: brown;
            width: 100px;
            height: 200px;
        }
        #test{
            display: flex;
            height: 200px;
            align-items: stretch
        }
        .div2{
            flex: 1
        }
    </style>
</head>
<body>
    <div id='d'>
        <p id='p'>
            <span id='s'>Click Me!</span>
        </p>
    </div>
    <script>
    
    var div = document.getElementById('d');
    var p = document.getElementById('p');
    var span = document.getElementById('s');
    function onClickFn (event) {
        var tagName = event.currentTarget.tagName;
        var phase = event.eventPhase;
        console.log(tagName, phase);
    }
    div.addEventListener('click', onClickFn, true);
    p.addEventListener('click', onClickFn, true); 
    //DIV 1
    //p 1


    // 捕获阶段 1 ，目标阶段 2 ，冒泡阶段 3
    // true表示该元素在事件的“捕获阶段”（由外往内传递时）响应事件；
    // false表示该元素在事件的“冒泡阶段”（由内向外传递时）响应时间。


    var o = {};
    var fn = function(){}
    console.log(typeof o.prototype ) 
    console.log(typeof o.__proto__ )
    console.log(typeof fn.prototype )
    console.log(typeof fn.__proto__ )

    //undefined
    //object
    //object
    //function

    var arr = [1,2,3,4,5,6];
    delete arr[1];
    console.log(arr.length);  
    arr.shift();
    console.log(arr) 
    //5
    //[empty,3,4,5,6]

    </script>
</body>
</html>